package com.material.vtool.mapper;

import com.material.vtool.entity.BTeamMaterialEntity;
import com.material.vtool.entity.combinedEntity.CombinedTeamMaterialEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TeamMaterialMapper {
    int insertEntity(BTeamMaterialEntity bTeamMaterialEntity);

    List<CombinedTeamMaterialEntity> getTeamMaterialList(@Param("teamId") Integer teamId, @Param("labelTypeId") Integer labelTypeId);

    Integer getTeamMaterialListTotal(@Param("teamId") Integer teamId, @Param("labelTypeId") Integer labelTypeId);

    int updateTeamMaterialStatus(@Param("id") Integer id, @Param("status") Integer status);

    int deleteTeamMaterialTop(Integer teamId);

    int updateTeamMaterialTopById(Integer id);

    BTeamMaterialEntity getTeamMaterialById(Integer teamMaterialId);

    Integer increaseShareCount(Integer teamMaterialId);

    BTeamMaterialEntity getTeamMemberMaterialCount(@Param("userId") Integer userId, @Param("teamId") Integer teamId, @Param("materialId") Integer materialId);

    Integer updateTeamMemberMaterialActive(@Param("userId") Integer userId, @Param("teamId") Integer teamId, @Param("materialId") Integer materialId);
}
